package com.crm.model.statisticAnalysis.vos;

import lombok.Data;


import java.time.LocalDate;

@Data
public class ClueDoughnutChart implements Comparable<ClueDoughnutChart> {
    //日期
    private LocalDate date;
    //线索数
    private Integer clueCount;
    //线索转换率
    private Double clueConversion;


    @Override
    public int compareTo(ClueDoughnutChart o) {
        int clueConversionResult = (int) (o.clueConversion - this.clueConversion);
        int clueCountResult =  clueConversionResult == 0 ? o.clueConversion.compareTo(this.clueConversion):clueConversionResult;
        int Result = clueCountResult == 0 ? 1 : clueCountResult;
        return Result;
    }
}
